<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <meta name="generator" content="HTML Tidy for Linux/x86 (vers 12 April 2005), see www.w3.org" />

  <title>Templates</title>
  <link href="book.css" rel="stylesheet" type="text/css" />
  <meta content="DocBook XSL-NS Stylesheets V1.73.0" name="generator" />
  <link rel="start" href="index.html" title="EPIC - User's Guide" />
  <link rel="up" href="ch05.html" title="Working with the Perl Editor" />
  <link rel="prev" href="ch05s07.html" title="Task Markers" />
  <link rel="next" href="ch05s09.html" title="Source Formatter" />
</head>

<body>
  <div class="section" lang="en" xml:lang="en">
    <div class="titlepage">
      <div>
        <div>
          <h2 class="title" style="clear: both"><a id="N10577" name="N10577"></a>Templates</h2>
        </div>
      </div>
    </div>

    <p>Templates allow for easy insertion of predefined text segments. In addition to normal text
    these segments can also include pre-defined variables that are included at runtime as well as
    variables that are specified by the user when the template is inserted.</p>

    <div class="section" lang="en" xml:lang="en">
      <div class="titlepage">
        <div>
          <div>
            <h3 class="title"><a id="N1057C" name="N1057C"></a>Defining Templates</h3>
          </div>
        </div>
      </div>

      <p>Templates are defined in the EPIC Preferences (<span class="guimenu">Window</span> →
      <span class="guimenuitem">Preferences...</span>). To define a new template, press the
      <span class="guibutton">New...</span> button.</p>

      <div class="screenshot">
        <div class="mediaobject" align="center">
          <img src="images/templates_2.gif" align="middle" alt="Template Dialog" />
        </div>
      </div>

      <p>To insert pre-defined variables, press the <span class="guibutton">Insert
      Variable...</span> button.</p>

      <div class="screenshot">
        <div class="mediaobject" align="center">
          <img src="images/templates_3.gif" align="middle" alt="Predefined Variables" />
        </div>
      </div>

      <p>In addition to pre-defined variables, the user can specify additional variables (using the
      syntax <strong class="userinput"><code>${varname}</code></strong>) which can be edited when
      the template is inserted. When the first variable is inserted, variables with the same name
      will automatically be changed.</p>
    </div>

    <div class="section" lang="en" xml:lang="en">
      <div class="titlepage">
        <div>
          <div>
            <h3 class="title"><a id="N105AE" name="N105AE"></a>Using Templates</h3>
          </div>
        </div>
      </div>

      <p>Templates are invoked by typing some characters and pressing <span class=
      "keycap"><strong>Ctrl</strong></span>+<span class="keycap"><strong>Space</strong></span>.</p>

      <p>Templates matching the typed characters will be displayed in a list. A preview is also
      available.</p>

      <div class="screenshot">
        <div class="mediaobject" align="center">
          <img src="images/templates_1.gif" align="middle" alt="Template Selection" />
        </div>
      </div>

      <p>If the template contains user defined variables the user can press the <span class=
      "keycap"><strong>TAB</strong></span> key to jump to the next variable after the template has
      been inserted.</p>

      <div class="screenshot">
        <div class="mediaobject" align="center">
          <img src="images/templates_4.gif" align="middle" alt="User Variables" />
        </div>
      </div>
    </div>
  </div>
</body>
</html>
